<template>
  <el-dialog
    title="百度地图导航 - 接入点"
    :visible.sync="open"
    :before-close="cancel"
    width="800px"
    append-to-body
  >
    <el-form ref="form" :model="form" class="dialog-form">
      <el-form-item
        label="以下是MCP接入点的地址。该链接包含您的授权令牌，请妥善保管。"
        prop="key"
      >
        <el-input v-model="form.key" type="textarea" disabled placeholder="key" />
      </el-form-item>
      <div class="dialog-footer">
        <el-button type="primary" size="mini" @click="handleCopy">复制</el-button>
      </div>
      <div class="tips">
        <p>使用说明:</p>
        <p>1.复制上面的地址</p>
        <p>2.在您的应用程序中连接到这个地址</p>
      </div>
    </el-form>
  </el-dialog>
</template>

<script>
export default {
  props: {
    open: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      form: {},
    };
  },
  methods: {
    cancel() {
      this.$emit("cancel");
    },
    handleCopy() {},
  },
};
</script>

<style scoped lang="scss">
.firmware {
  margin: 0 0 22px 0;
  .firmware-top {
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
}
.upload-btn {
  display: block;
}
.el-form-item-upload {
  display: block;
  width: 100%;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
}
.tips {
  margin-top: 24px;
  background-color: #f5f5f5;
  padding: 16px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5714285714285714;
}
.tips p {
  margin-bottom: 8px;
}
</style>

<style>
.el-form-item-upload-div .el-form-item__label {
  float: none !important;
}
</style>
